
function usePost(url,data){
    if(!url) return null;

    let params = {
            "url": url,
           "method": "POST",
           "data": data,
    }
    let cookie = pageUserStore.getString('cookie','')+''
     logd(cookie,JSON.stringify(typeof cookie))
    if(cookie){
        params['cookie'] = {
           "token":cookie
        }
    }
    // logd('请求参数',JSON.stringify(params));
    const result = http.request(params);
    if( result.cookie) {
        // logd('result.cookie',result.cookie)
        const ckie = (result.cookie.match(/=.*}/ig) || [])[0] || ''
        // logd('解析cookie:',ckie)
        if(ckie){
            pageUserStore.putString('cookie', ckie.replace(/^=|}/g, ''))
        }
    }
    // logd('接口返回数据：',result.body);
    return JSON.parse(result.body)
}